package com.xiaoyi.ui.fragment.pic;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.widget.Toolbar;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.avin.yi.R;
import com.xiaoyi.ui.fragment.base.BaseMainFragment;


public class PicFragment extends BaseMainFragment {

    public static PicFragment newInstance() {

        Bundle args = new Bundle();

        PicFragment fragment = new PicFragment();
        fragment.setArguments(args);
        return fragment;
    }

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.zhihu_fragment_first, container, false);
        Toolbar mToolbar =  view.findViewById(R.id.toolbar);
        mToolbar.setTitle("图片欣赏");
        return view;
    }

    @Override
    public void onLazyInitView(@Nullable Bundle savedInstanceState) {
        super.onLazyInitView(savedInstanceState);

        if (findChildFragment(PicTypeFragment.class) == null) {
            loadRootFragment(R.id.fl_first_container, PicTypeFragment.newInstance());
        }
    }

    @Override
    public boolean onBackPressedSupport() {
        super.onBackPressedSupport() ;
        return true;
    }


}
